//****************************************************
// Porman Project 
// Filename: CRenderUnity.h
// Date: 2011/01/26
// Author: KengYu Lin
// Modify:
//****************************************************
#ifndef _CRENDERUNITY_H
#define _CRENDERUNITY_H
#include "glm-0.9.0.6/glm/glm.hpp"
#include "CRSDef.h"
#include "CRenderBase.h"

namespace Porman
{

namespace RS
{

class CRenderUnityData
{
public:
    CRenderUnityData( void ) : m_mat4x4LocalMatrix(), m_mat4x4WorldMatrix() {}
    CRenderUnityData( const CRenderUnityData& l ) { (*this) = l; }
    CRenderUnityData& operator=( const CRenderUnityData& l )
    {
        m_mat4x4LocalMatrix = l.m_mat4x4LocalMatrix;
        m_mat4x4WorldMatrix = l.m_mat4x4WorldMatrix;
        return (*this);
    }

    glm::mat4x4 m_mat4x4LocalMatrix;
    glm::mat4x4 m_mat4x4WorldMatrix;
};

class CRenderUnity : public CRenderBase
{
public:
    CRenderUnity( const std::string& sName, unsigned int uiHash );
    virtual ~CRenderUnity( void );

    PRS_API void initial( void );

    virtual void onSwap( void );
    virtual void onRender( void );

protected:
    CDataHandlerT<CRenderUnityData> m_hUnityData;
};

}//End namespace RS

}//End namespace Porman

#endif